home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ScriptableObjectList.h
-
- Contains: xxx put contents here xxx
-
- Written by: Andy Nicholas, Greg Anderson, Chris Bingham, John Rohrlich, Max McFarland, Paul Ossenbruggen, Mike Kobb
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- <1> 6/6/95 ga
-
- */
-
-
- #ifndef __SCRIPTABLEOBJECTLIST__
- #define __SCRIPTABLEOBJECTLIST__
-
- //
- // We wouldn't need the entire list file if we didn't include an iterator
- // in our class
- //
- #include "ListTemplate.h"
-
- //
- // AbstractIterator is needed for definition of TAbstractIterator
- //
- #include "AbstractIterator.h"
-
- class TAbstractScriptableObject;
-
-
- //========================================================================================
- // Class TScriptableObjectListIterator
- //========================================================================================
- class TScriptableObjectListIterator : public TAbstractObjectIterator
- {
- public:
- virtual ~TScriptableObjectListIterator();
-
- TScriptableObjectListIterator(AListOf<TAbstractScriptableObject*>* list) :
- fList(list), fIter(list) {}
-
- //
- // Interface to code to:
- //
- virtual void Reset(const TAETransaction& t, Boolean iterationDirection = kForwardIteration);
- virtual Boolean More(const TAETransaction&) const;
- virtual void Next(const TAETransaction&);
- virtual TAbstractScriptableObject* Current(const TAETransaction&);
-
- //
- // Override these methods to improve performance:
- //
- virtual long CountElements(const TAETransaction& t, DescType desiredClass);
- virtual TAbstractScriptableObject* GetIndexedElement(const TAETransaction& t, DescType desiredClass, long index);
- virtual Boolean Contains(const TAETransaction& t, TAbstractScriptableObject* objectToTestForMembership);
-
- private:
- AListOf<TAbstractScriptableObject*>* fList;
- AnIteratorOfAListOf<TAbstractScriptableObject*> fIter;
- };
-
- #endif
-